package it.unipi.di.rasip.utils;

/** RGB simple class color
 * 
 * @author paolo
 *
 */
public class Color {
	public static final Color BLACK = new Color (0,0,0);
	public static final Color WHITE = new Color (255, 255, 255);
	public static final Color RED = new Color (255,0,0);
	public static final Color GREEN = new Color (0,255,0);
	public static final Color BLUE = new Color (0,0,255);
	public static final Color CYAN = new Color (255,255,0);
	
	public static final Color LIGHT_GRAY = new Color (220, 220, 220);
	
	int r, g, b;
	public Color(int r, int g, int b) {
		this.r = r;
		this.g = g;
		this.b = b;
	}
	
	public int getCode() {
		int result=0;
		result |= b;
		result |= g<<8;
		result |= r<<16;
		return result;
	}
}
